package com.xing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xing.dto.AuthenticationDTO;
import lombok.Data;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2024/4/19 21:06
 */
@Data
@TableName("live_identity_authentication")
public class AuthenticationEntity {
    @TableId
    private Long id;
    private String realName;
    private String idCard;
    private String address;
    private Long frontalView;
    private Long reverseView;
    private Integer delFlag;
    private Integer sex;

    public AuthenticationEntity entity(AuthenticationDTO dto){
        AuthenticationEntity authenticationEntity = new AuthenticationEntity();
        authenticationEntity.setAddress(dto.getAddress());
        authenticationEntity.setRealName(dto.getRealName());
        authenticationEntity.setIdCard(dto.getIdCard());
        authenticationEntity.setSex(dto.getSex());
        authenticationEntity.setFrontalView(dto.getFrontalView());
        authenticationEntity.setReverseView(dto.getReverseView());
        authenticationEntity.setDelFlag(0);
        return authenticationEntity;
    };
}
